package com.hello.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.hello.common.core.annotation.Excel;
import com.hello.common.core.web.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 专题文章对象 sd_topic_articles
 * 
 * @author hello
 * @date 2025-05-30
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class TopicArticles extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 文章ID，主键，自增 */
    private Long articleId;

    /** 关联的话题ID，外键 */
    @Excel(name = "关联的话题ID，外键")
    private Long topicId;

    /** 用户ID（允许匿名，可为空），关联系统用户表 */
    @Excel(name = "用户ID", readConverterExp = "允=许匿名，可为空")
    private Long userId;

    /** 文章标题，不能为空 */
    @Excel(name = "文章标题，不能为空")
    private String title;

    /** 文章内容，不能为空 */
    @Excel(name = "文章内容，不能为空")
    private String content;

    /** 封面图片URL */
    @Excel(name = "封面图片URL")
    private String coverImage;

    /** 可见性：私人或公开 */
    @Excel(name = "可见性：私人或公开")
    private String visibilityType;

    /** 是否匿名发布，默认为否 */
    @Excel(name = "是否匿名发布，默认为否")
    private Integer isAnonymous;

    /** 是否为精选文章，默认为否 */
    @Excel(name = "是否为精选文章，默认为否")
    private Integer isFeatured;

    /** 文章状态 */
    @Excel(name = "文章状态")
    private String status;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedAt;

    /** 发布时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发布时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date publishedAt;

    /** 点赞数，默认为0 */
    @Excel(name = "点赞数，默认为0")
    private Long likesCount;

    /** 评论数，默认为0 */
    @Excel(name = "评论数，默认为0")
    private Long commentsCount;

    /** 查看总数，默认为0 */
    @Excel(name = "查看总数，默认为0")
    private Long viewsCount;

    /** 分享次数，默认为0 */
    @Excel(name = "分享次数，默认为0")
    private Long sharesCount;

    public void setArticleId(Long articleId) 
    {
        this.articleId = articleId;
    }

    public Long getArticleId() 
    {
        return articleId;
    }
    public void setTopicId(Long topicId) 
    {
        this.topicId = topicId;
    }

    public Long getTopicId() 
    {
        return topicId;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setTitle(String title) 
    {
        this.title = title;
    }

    public String getTitle() 
    {
        return title;
    }
    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }
    public void setCoverImage(String coverImage) 
    {
        this.coverImage = coverImage;
    }

    public String getCoverImage() 
    {
        return coverImage;
    }
    public void setVisibilityType(String visibilityType) 
    {
        this.visibilityType = visibilityType;
    }

    public String getVisibilityType() 
    {
        return visibilityType;
    }
    public void setIsAnonymous(Integer isAnonymous) 
    {
        this.isAnonymous = isAnonymous;
    }

    public Integer getIsAnonymous() 
    {
        return isAnonymous;
    }
    public void setIsFeatured(Integer isFeatured) 
    {
        this.isFeatured = isFeatured;
    }

    public Integer getIsFeatured() 
    {
        return isFeatured;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }
    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }
    public void setUpdatedAt(Date updatedAt) 
    {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt() 
    {
        return updatedAt;
    }
    public void setPublishedAt(Date publishedAt) 
    {
        this.publishedAt = publishedAt;
    }

    public Date getPublishedAt() 
    {
        return publishedAt;
    }
    public void setLikesCount(Long likesCount) 
    {
        this.likesCount = likesCount;
    }

    public Long getLikesCount() 
    {
        return likesCount;
    }
    public void setCommentsCount(Long commentsCount) 
    {
        this.commentsCount = commentsCount;
    }

    public Long getCommentsCount() 
    {
        return commentsCount;
    }
    public void setViewsCount(Long viewsCount) 
    {
        this.viewsCount = viewsCount;
    }

    public Long getViewsCount() 
    {
        return viewsCount;
    }
    public void setSharesCount(Long sharesCount) 
    {
        this.sharesCount = sharesCount;
    }

    public Long getSharesCount() 
    {
        return sharesCount;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("articleId", getArticleId())
            .append("topicId", getTopicId())
            .append("userId", getUserId())
            .append("title", getTitle())
            .append("content", getContent())
            .append("coverImage", getCoverImage())
            .append("visibilityType", getVisibilityType())
            .append("isAnonymous", getIsAnonymous())
            .append("isFeatured", getIsFeatured())
            .append("status", getStatus())
            .append("createdAt", getCreatedAt())
            .append("updatedAt", getUpdatedAt())
            .append("publishedAt", getPublishedAt())
            .append("likesCount", getLikesCount())
            .append("commentsCount", getCommentsCount())
            .append("viewsCount", getViewsCount())
            .append("sharesCount", getSharesCount())
            .toString();
    }
}
